// duel
/*
 * Things to remember:
 * 1. Binary Search? DP? Greedy? Bitset?
 * 2. Find a conclusion?
 * 3. long long? Enough array size?
 * 4. Stay calm and focus on main points!
 * */
#include <cstdio>
#include <iostream>
#include <set>
#include <algorithm>
#define ll long long
#define rep(i, s, t) for(int i=s; i<=t; ++i)
#define debug(x) cerr<<#x<<":"<<x<<"\n";
using namespace std;
const int N=100010;

int n; bool vis[N];
struct node
{
	int x, id;
	bool operator <(node a) const
	{
		if(x!=a.x) return x<a.x;
		return id<a.id;
	}
} a[N];
set<node> S;

int main()
{
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	scanf("%d", &n);
	rep(i, 1, n)
	{
		int x; scanf("%d", &x);
		a[i]={x, i};
		S.insert(a[i]);
	}
	sort(a+1, a+n+1);
	rep(i, 1, n) if(!vis[a[i].id])
	{
		auto w=*S.begin();
		if(w.x<a[i].x) S.erase(w), vis[w.id]=1;
	}
	printf("%lu\n", S.size());
	
	return 0;
}